%% This is file `ifthen.sty', %% generated with the docstrip utility. %% The original source files were: %% ifthen.dtx (with options: `package') %% This is a generated file. %% Copyright 1993 1994 1995 1996 1997 %% The LaTeX3 Project and any individual authors listed elsewhere %% in this file. %% For further copyright information, and conditions for modification %% and distribution, see the file legal.txt, and any other copyright %% notices in this file. %% This file is part of the LaTeX2e system. %% ---------------------------------------- %% This system is distributed in the hope that it will be useful, %% but WITHOUT ANY WARRANTY; without even the implied warranty of %% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. %% For error reports concerning UNCHANGED versions of this file no %% more than one year old, see bugs.txt. %% Please do not request updates from us directly. Primary %% distribution is through the CTAN archives. %% IMPORTANT COPYRIGHT NOTICE: %% You are NOT ALLOWED to distribute this file alone. %% You are allowed to distribute this file under the condition that it %% is distributed together with all the files listed in manifest.txt. %% If you receive only some of these files from someone, complain! %% Permission is granted to copy this file to another file with a %% clearly different name and to customize the declarations in that %% copy to serve the needs of your installation, provided that you %% comply with the conditions in the file legal.txt. %% However, NO PERMISSION is granted to generate or to distribute a %% modified version of this file under its original name. %% You are NOT ALLOWED to change this file. %% MODIFICATION ADVICE: %% If you want to customize this file, it is best to make a copy of %% the source file(s) from which it was produced. Use a different %% name for your copy(ies) and modify the copy(ies); this will ensure %% that your modifications do not get overwritten when you install a %% new release of the standard system. You should also ensure that %% your modified source file does not generate any modified file with %% the same name as a standard file. %% You can then easily distribute your modifications by distributing %% the modified and renamed copy of the source file, taking care to %% observe the conditions in legal.txt; this will ensure that other %% users can safely use your modifications. %% You will also need to produce your own, suitably named, .ins file to %% control the generation of files from your source file; this file %% should contain your own preambles for the files it generates, not %% those in the standard .ins files. %% The names of the source files used are shown above. %% File `ifthen.dtx'. %% Copyright (C) 1991 by Leslie Lamport %% Copyright (C) 1994-1995 LaTeX3 project, David Carlisle %% all rights reserved. \NeedsTeXFormat{LaTeX2e}[1994/12/01] \ProvidesPackage{ifthen} [1996/08/02 v1.0m Standard LaTeX ifthen package (DPC)] \def\TE@throw{\@ne=\@ne\noexpand\fi} \def\boolean#1#2{% \TE@throw\expandafter\noexpand\csname if#1\endcsname#2} \def\TE@length#1#2{\TE@throw\noexpand\ifdim#1#2} \def\TE@odd#1#2{% \TE@throw\noexpand\TE@@odd#1\noexpand\@nil\noexpand\ifodd\count@#2} \def\TE@@odd#1#2\@nil{% \@defaultunits \count@\if-#1-0\else0\expandafter#1\fi#2\relax\@nnil} \def\TE@repl#1#2{% \long\def\@tempc##1#1##2{% \def\@tempa{##2}\def\@tempb{\@tempc}% \ifx\@tempa\@tempb \toks@\expandafter{\the\toks@##1}% \expandafter\@gobble \else \toks@\expandafter{\the\toks@##1#2}% \expandafter\@tempc \fi ##2}% \expandafter\toks@\expandafter{\expandafter}% \expandafter\@tempc\the\toks@#1\@tempc} \long\def\ifthenelse#1{% \toks@{#1}% \TE@repl\or\TE@or \TE@repl\and\TE@and \TE@repl\not\TE@neg \begingroup \let\protect\@unexpandable@protect \def\@setref##1##2##3{% \ifx##1\relax\z@\else\expandafter##2##1\fi}% \def\value##1{\the\csname c@##1\endcsname}% \let\equal\TE@equal \let\(\TE@lparen \let\)\TE@rparen \let\isodd\TE@odd \let\lengthtest\TE@length \begingroup \let\@tempa\relax\let\@tempb\relax \xdef\@gtempa{\expandafter\TE@eval\the\toks@\TE@endeval}% \endgroup \@gtempa \expandafter\endgroup\ifTE@val \expandafter\@firstoftwo \else \expandafter\@secondoftwo \fi} \def\TE@eval{\noexpand\TE@negatefalse\noexpand\iftrue\noexpand\ifnum} \newif\ifTE@val \newif\ifTE@negate \def\TE@endeval{\relax \noexpand\TE@setvaltrue\noexpand \else \noexpand\TE@setvalfalse\noexpand \fi \noexpand\TE@negatefalse\noexpand \fi} \def\TE@setvaltrue{% \ifTE@negate\TE@valfalse\else\TE@valtrue\fi} \def\TE@setvalfalse{\let\ifTE@val\ifTE@negate} \def\TE@or{\TE@endeval\noexpand\ifTE@val\noexpand\else\noexpand\ifnum} \def\TE@and{\TE@endeval\noexpand\ifTE@val\noexpand\ifnum} \def\TE@neg{\TE@throw\noexpand\TE@negswitch\noexpand\ifnum} \def\TE@negswitch{\ifTE@negate\TE@negatefalse\else\TE@negatetrue\fi} \def\TE@lparen#1{\TE@throw\begingroup\TE@eval#1} \def\TE@rparen#1{% \TE@endeval \noexpand\expandafter\endgroup\noexpand\ifTE@val#1} \long\def\TE@equal#1#2#3{\TE@throw \def\@tempa{#1}\def\@tempb{#2}% \noexpand\ifx\@tempa\@tempb#3} \def\setboolean#1#2{% \lowercase{\def\@tempa{#2}}% \@ifundefined{@tempswa\@tempa}% {\PackageError{ifthen}% {You can only set a boolean to `true' or `false'}\@ehc}% {\@ifundefined{#1\@tempa}% {\PackageError{ifthen}{Boolean #1 undefined}\@ehc}% {\csname#1\@tempa\endcsname}}} \def\newboolean#1{% \expandafter\@ifdefinable\csname if#1\endcsname{% \expandafter\newif\csname if#1\endcsname}} \def\provideboolean#1{% \@ifundefined{if#1}{% \expandafter\newif\csname if#1\endcsname}\relax} \long\def\whiledo#1#2{% \ifthenelse{#1}% {\@whiledotrue \@whilesw\if@whiledo\fi {#2% \ifthenelse{#1}\@whiledotrue\@whiledofalse}}% {}% \newif\if@whiledo \endinput %% End of file `ifthen.sty'.